package IO_study.charStream;

import java.io.FileReader;
import java.io.Reader;

/**
 * 文件字符输入流,以字符数来读取
 */
public class FileReaderDemo1 {
    public static void main(String[] args) throws Exception {
        Reader r = new FileReader("Java-basic/src/IO_study/data.txt");

        int code;
        while ((code = r.read()) != -1){
            System.out.print((char)code);
        }
    }
}
